﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using EasyNetQ;
using K2.Listener.Entity;
using K2.Sync.Service.Handlers;
using K2.Sync.Service.Services;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Driver;

namespace K2.Sync.Service
{
    class Program
    {
        static void Main(string[] args)
        {
            //var bus = RabbitHutch.CreateBus("host=192.168.184.155;username=aryan;password=demopc");
            //bus.Receive<WorklistListenerEntity>("k2.sync.task", msg => new WorklistHandler().HandleWorklistMsg(msg));
            //bus.Receive<ActInstSlotListenerEntity>("k2.sync.task", msg => new ActInstSlotHandler().HandleWorklistMsg(msg));
            K2DataService dataService = new K2DataService();
            JavaScriptSerializer js = new JavaScriptSerializer();
            var tm = js.Serialize(dataService.GetDataFieldData(191));
            Console.WriteLine(tm);
            Console.Read();
        }
    }
}
